package DAO;

import java.util.List;

public class UserDaoImpl implements UserDao {
	private String username;
	private int age;
	private List<String> nameList;

	public void setNameList(List<String> nameList) {
		this.nameList = nameList;
	}

	public UserDaoImpl() {
		System.out.println("UserDaoImpl is creating");
	}

	@Override
	public void save() {
		System.out.println("save running...");
		System.out.println(toString());
	}

	public void init() {
		System.out.println("init method is executing...");
	}

	public void destory() {
		System.out.println("destory method is executing...");
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public void setAge(int age) {
		this.age = age;
	}

	@Override
	public String toString() {
		return "UserDaoImpl [age=" + age + ", nameList=" + nameList + ", username=" + username + "]";
	}
}
